﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ProjectileWarhead : MonoBehaviour {
    public Warrior target;
    public int hitPoint;

    public void explode()
    {
        if(target!=null)
        {
            AttackInfo attack = new AttackInfo()
            {   HitPoint = hitPoint,
                type = AttackType.RangeAttack,
                AttackOriginPos = transform.position };
            target.GetHit(attack);
        }
    }
	
}
